public class ThreadDemo13 {
    public static void main(String[] args) {
//        System.out.println(Thread.currentThread().getPriority());// 获取主线程的优先级
        MyThread07 myThread7 = new MyThread07();
//        System.out.println(myThread7.getPriority());
        myThread7.setPriority(Thread.MAX_PRIORITY);// 最高优先级
//        Thread.currentThread().setPriority(Thread.MIN_PRIORITY);// 最低优先级
        myThread7.start();
        for (int i = 0; i < 1000; i++) {
            System.out.println("主线程" + i);
        }
    }
}

class MyThread07 extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 1000; i++) {
            System.out.println("子线程" + i);
        }
    }
}